package com.dsc.ctrl;

import com.dsc.feign.FeignProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope // 刷新配置
public class ConsumerRestController {

    @Autowired
    private FeignProviderService feignProviderService;

    /**
     * getWay方式调用
     * @param parmas
     * @return
     */
    @GetMapping("/feign/hi")
    public String feignEcho(String parmas) {
        return feignProviderService.sayHello(parmas);
    }
}
